from django.http import (
    HttpResponseBadRequest,
    JsonResponse,
)

from common import replaces, requests, custom_logger


def test(request):
    if request.method != "GET":
        return HttpResponseBadRequest()

    respon = {}

    respon["code"] = 200
    respon["message"] = "successful"
    respon["data"] = "this is a test"

    custom_logger.info("this is a custom log test")

    return JsonResponse(respon)
